package com.ruoyi.ihome.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ihome.mapper.TagAndHomeMapper;
import com.ruoyi.ihome.domain.TagAndHome;
import com.ruoyi.ihome.service.ITagAndHomeService;

import javax.annotation.Resource;

/**
 * 标签房间中间表Service业务层处理
 * 
 * @author NING
 * @date 2024-08-12
 */
@Service
public class TagAndHomeServiceImpl implements ITagAndHomeService 
{
    @Resource
    private TagAndHomeMapper tagAndHomeMapper;

    /**
     * 查询标签房间中间表
     * 
     * @param id 标签房间中间表主键
     * @return 标签房间中间表
     */
    @Override
    public TagAndHome selectTagAndHomeById(Long id)
    {
        return tagAndHomeMapper.selectTagAndHomeById(id);
    }

    /**
     * 查询标签房间中间表列表
     * 
     * @param tagAndHome 标签房间中间表
     * @return 标签房间中间表
     */
    @Override
    public List<TagAndHome> selectTagAndHomeList(TagAndHome tagAndHome)
    {
        return tagAndHomeMapper.selectTagAndHomeList(tagAndHome);
    }

    /**
     * 新增标签房间中间表
     * 
     * @param tagAndHome 标签房间中间表
     * @return 结果
     */
    @Override
    public int insertTagAndHome(TagAndHome tagAndHome)
    {
        return tagAndHomeMapper.insertTagAndHome(tagAndHome);
    }

    /**
     * 修改标签房间中间表
     * 
     * @param tagAndHome 标签房间中间表
     * @return 结果
     */
    @Override
    public int updateTagAndHome(TagAndHome tagAndHome)
    {
        return tagAndHomeMapper.updateTagAndHome(tagAndHome);
    }

    /**
     * 批量删除标签房间中间表
     * 
     * @param ids 需要删除的标签房间中间表主键
     * @return 结果
     */
    @Override
    public int deleteTagAndHomeByIds(Long[] ids)
    {
        return tagAndHomeMapper.deleteTagAndHomeByIds(ids);
    }

    /**
     * 删除标签房间中间表信息
     * 
     * @param id 标签房间中间表主键
     * @return 结果
     */
    @Override
    public int deleteTagAndHomeById(Long id)
    {
        return tagAndHomeMapper.deleteTagAndHomeById(id);
    }
}
